From: xiaofan Date: Sun, 10 Sep 2023 07:56:33 +0000 (+0200) Subject: ibusManager: Add missing environment variables required to launch ibus-daemon X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~312^2^2~10 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=050d0e10c79b1c16d8be4feb6035f7755f8c8b0a;p=gnome-shell.git ibusManager: Add missing environment variables required to launch ibus-daemon IBus requires XAUTHORITY and XDG_RUNTIME_DIR to be able to spawn its XIM implementation correctly. Using launch context to get environment can correctly launch on non-systemd setups. Closes: #6998 Signed-off-by: xiaofan Part-of: --- diff --git a/js/misc/ibusManager.js b/js/misc/ibusManager.js index 898899212..510561b4d 100644 --- a/js/misc/ibusManager.js +++ b/js/misc/ibusManager.js @@ -115,17 +115,9 @@ class IBusManager extends Signals.EventEmitter { _spawn(extraArgs = []) { try { - let cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs]; - let env = []; - - this._tryAppendEnv(env, 'DBUS_SESSION_BUS_ADDRESS'); - this._tryAppendEnv(env, 'WAYLAND_DISPLAY'); - this._tryAppendEnv(env, 'HOME'); - this._tryAppendEnv(env, 'LANG'); - this._tryAppendEnv(env, 'LC_CTYPE'); - this._tryAppendEnv(env, 'COMPOSE_FILE'); - this._tryAppendEnv(env, 'DISPLAY'); - + const cmdLine = ['ibus-daemon', '--panel', 'disable', ...extraArgs]; + const launchContext = global.create_app_launch_context(0, -1); + const env = launchContext.get_environment(); // Use DO_NOT_REAP_CHILD to avoid adouble-fork internally // since ibus-daemon refuses to start with init as its parent. const [success_, pid] = GLib.spawn_async(